UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ogWxPHwMpxdTwUfXChBgSlor0aTXxt2BcCVVQ3bGR4Q='
WHERE
key_id = '25ea2b38a7174e0b1dfe62944b349912bb00610cbb54cb8949daea77b4ed91eb'
AND (
token = 'ogWxPHwMpxdTwUfXChBgSlor0aTXxt2BcCVVQ3bGR4Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)