UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RFbuP5VvfVQ6yWciBfN2VlV2Ci/MbJhA2NEBke800C8='
WHERE
key_id = 'e6c059cc96362d47f23470dafe3d04b53abaf1079a1eb01ee66c3f061eb06526'
AND (
token = 'RFbuP5VvfVQ6yWciBfN2VlV2Ci/MbJhA2NEBke800C8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)