UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kGK2/qshS+hTopB6EfHeTgnrWuuFpEYMbTgXkYqgMMw='
WHERE
key_id = '9148f510c14a105f9710c1fe8aeb6eaff7ad4995327ab59ab2327e8b027de81c'
AND (
token = 'kGK2/qshS+hTopB6EfHeTgnrWuuFpEYMbTgXkYqgMMw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)