UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'isEEQ+21+zWwIHXgXM7Ote63iTCcPd+p/hgMJ7//GtA='
WHERE
key_id = 'f005488565eb4c78731dd7825364b1d79e456af9ea38981759dd44421860d975'
AND (
token = 'isEEQ+21+zWwIHXgXM7Ote63iTCcPd+p/hgMJ7//GtA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)