UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3IA41oEDU9T1rrAuqYHz8AH+5RA5nkj1Szs55S0mXwg='
WHERE
key_id = '9c184d8cdc926c308042cdea5a5ec6d49883478571882e8e06ad5839d734219e'
AND (
token = '3IA41oEDU9T1rrAuqYHz8AH+5RA5nkj1Szs55S0mXwg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)