UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '22VKF3JYpD24wYfKbdjCjCMmEHrnNFj/0a9kZ7JtwoY='
WHERE
key_id = 'e634d215f606e258b6ff5d87172eecbe7145338afad8aa12f2205e3ed9277d3a'
AND (
token = '22VKF3JYpD24wYfKbdjCjCMmEHrnNFj/0a9kZ7JtwoY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)