UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FH/GOl+FdRP6+sz4K8Kg5Za4bEkGQKIvZdF3dUl57mM='
WHERE
key_id = 'eb812e7f1e8a02a99f667eb8343e292a91bd12a72cde1e3227703e4ac0b2236c'
AND (
token = 'FH/GOl+FdRP6+sz4K8Kg5Za4bEkGQKIvZdF3dUl57mM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)