UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KjeeqzxyKPmKxL3/cih4yHZjbSANV6XrBDQfk+3N9L0='
WHERE
key_id = 'e845e29079b998abdbe72ed2a8a2682db0ee4f8845c0b0dc464f6673b8572749'
AND (
token = 'KjeeqzxyKPmKxL3/cih4yHZjbSANV6XrBDQfk+3N9L0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)