UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kga9rbC+HrARzo059IJDzf7T73IHgL5JZPJn7HiQP9Q='
WHERE
key_id = '53ce8c8ecdd3fd529c245d59969cc9428588b36e93418129531c28b668161de0'
AND (
token = 'kga9rbC+HrARzo059IJDzf7T73IHgL5JZPJn7HiQP9Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)