UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'THLeOO+QjeF2FdnfNGJFi4gSKVSSaMfNqlgOfTm2HTs='
WHERE
key_id = '932ea35eeee1204e9455abc9397e5570dad742cbd71b1c1b9f87ed8f0a2a562c'
AND (
token = 'THLeOO+QjeF2FdnfNGJFi4gSKVSSaMfNqlgOfTm2HTs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)