UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QmIIgqPb5d17vfyEKLRC4Xi2M2VU8yQD68p/68xLXpA='
WHERE
key_id = '6f2bf80b437b3d0e514ff9508ae89c0477e9f2483ab2af7d4b1a1d51cc440dee'
AND (
token = 'QmIIgqPb5d17vfyEKLRC4Xi2M2VU8yQD68p/68xLXpA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)