UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j8bsNAH/C93kg4lgMs73PpaxppaA49rTpWppFhatLSo='
WHERE
key_id = 'df32bb1220460846ac7094dd7fc7cf5aa03ea6223118378ec1fffa7ee00ab00c'
AND (
token = 'j8bsNAH/C93kg4lgMs73PpaxppaA49rTpWppFhatLSo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)