UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'K75gemxnnDRquELscXB4kTgCGcqsvD4hCPSsayZxois='
WHERE
key_id = 'f7f4c25c01bea673d22b4e22e70b8e2aa0f3289e5249ee179e07cbbb22783b72'
AND (
token = 'K75gemxnnDRquELscXB4kTgCGcqsvD4hCPSsayZxois='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)