UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CKMkB6QfXshymhUAlIayzh2jqrWiUmWr+mJz4hi9dBs='
WHERE
key_id = '74ea0b8dbea79925d70e1347dbb9f02c0e2eceada02907de88f27146a9528d03'
AND (
token = 'CKMkB6QfXshymhUAlIayzh2jqrWiUmWr+mJz4hi9dBs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)