UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GXocNoo+0+X1KBl5TpyArYfOpj/KYP4NkBapL4aOxD0='
WHERE
key_id = '44759897762321d37d5b375908eb7f1f393f48304722b950f22be5d2b737a88d'
AND (
token = 'GXocNoo+0+X1KBl5TpyArYfOpj/KYP4NkBapL4aOxD0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)