UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mmoijrYuwELzZugJMVywAEYqIhWBv5zli2clf7pQ/UI='
WHERE
key_id = '682c5c98b4cb02924b7de5a1a95213e584237ecd48db2294fde441fc82313b80'
AND (
token = 'mmoijrYuwELzZugJMVywAEYqIhWBv5zli2clf7pQ/UI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)