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