UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FBLZNPHTXUuzq4DMEgR5MJTQmruba/R3DLox5M+bkvM='
WHERE
key_id = 'c52deba3e4fc30bdec7d946ade76424d46c2f98fad3a9d359237fe92d0e2d639'
AND (
token = 'FBLZNPHTXUuzq4DMEgR5MJTQmruba/R3DLox5M+bkvM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)