UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+UWFaaO2/Nhh13WmhyVq0S/uWDcGGIKbvcLzlvX8mNY='
WHERE
key_id = '2c69ba422fe2f51f74221cc03f383c9caab61e3e3a21ee6874530729d8c73d61'
AND (
token = '+UWFaaO2/Nhh13WmhyVq0S/uWDcGGIKbvcLzlvX8mNY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)