UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '73hICzQZ4sOBCMuFMpSFgrzHgBqqZTDl4En4DPvrJX0='
WHERE
key_id = '8c654af90bde4ce42f1d1a03dd9345cbd2a71e82af6cec6989fc65525d07d16f'
AND (
token = '73hICzQZ4sOBCMuFMpSFgrzHgBqqZTDl4En4DPvrJX0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)