UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Kq4ouKDTpS3nJHRtHYOH2yiPskOBS4O2T1tD0v/V6Eo='
WHERE
key_id = '956f4cfd77b29f9f9366cbecce6848ba4566bb696f67532a28cf5a729ed2b90d'
AND (
token = 'Kq4ouKDTpS3nJHRtHYOH2yiPskOBS4O2T1tD0v/V6Eo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)