UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZVJjRZSO27FpmwgtVF24JTVWS+iNDiqn7eQ8af2Q7RY='
WHERE
key_id = '7c77e6d92fa647dddd44c2a21ba61eacf5b25e9bbb7d6a3bc21ed550fa52abba'
AND (
token = 'ZVJjRZSO27FpmwgtVF24JTVWS+iNDiqn7eQ8af2Q7RY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)