UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tMye0GA4IN2AkSHKoRfdzwWzeBFxSPxeAlNe/FLsSj4='
WHERE
key_id = '25de8f4fb109b412f5c86fbe4cf4ab0472936df03116ef3a1fb7a955dcebf67a'
AND (
token = 'tMye0GA4IN2AkSHKoRfdzwWzeBFxSPxeAlNe/FLsSj4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)