UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PwxR2FBaEAkpXClwip5/dERMAL6jKBpVGfYFS74Ux/A='
WHERE
key_id = '4461ad554a19cf37565083dd1508a30f3759ebeb75a604c9d6e6463832adb2f4'
AND (
token = 'PwxR2FBaEAkpXClwip5/dERMAL6jKBpVGfYFS74Ux/A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)