UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cVBLzu+KOpE852wlRkHbtgQESfr/zr6mMhsev72g4ow='
WHERE
key_id = '660bc4cf9cf2feb06025aed43e8ff74951b686ac5694fffe860ab34fe0abec94'
AND (
token = 'cVBLzu+KOpE852wlRkHbtgQESfr/zr6mMhsev72g4ow='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)