UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sEzEilHkGK4ygtxTeAFuIXLJCOnI0g5IqR1yK5t1LaE='
WHERE
key_id = '2ee72266e103b64b45a3f2c37043da609cf8c6b524f41ba2a2164d2f049f68d0'
AND (
token = 'sEzEilHkGK4ygtxTeAFuIXLJCOnI0g5IqR1yK5t1LaE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)