UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+ukyOQ/pwbLVrc0qXJsub9ctFgzefIvtbjvMiFSq0Vc='
WHERE
key_id = 'd0d29f66be2135f6dbb2a09e5925a7d87091eb192b44a65423e33d74f66d069f'
AND (
token = '+ukyOQ/pwbLVrc0qXJsub9ctFgzefIvtbjvMiFSq0Vc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)