UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hB0wLvn0PuQCgAu45ZIum/+dtXrL3wjOqi+R5g5JBdw='
WHERE
key_id = 'f135978399997ccf9df108cc6b1dbe5f6c83eb43c8b026289f08e9a7196f5e8d'
AND (
token = 'hB0wLvn0PuQCgAu45ZIum/+dtXrL3wjOqi+R5g5JBdw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)