UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3FHOfNPFWIJn61ft6X2yl88mQy+Eqh5JjZKzQBtUA9Q='
WHERE
key_id = '19a7678a500d2949f1eb25ca085829bea73e4d42a941721447cc859fc77ed403'
AND (
token = '3FHOfNPFWIJn61ft6X2yl88mQy+Eqh5JjZKzQBtUA9Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)