UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FNW4n/5j0BFZrqmmcSVMrkUrF6to5xMG+CI0kinv6+Y='
WHERE
key_id = '8cf51a17d8c371137018c251d0138f80d37fa3e326e01bfbae3d228c97cb9558'
AND (
token = 'FNW4n/5j0BFZrqmmcSVMrkUrF6to5xMG+CI0kinv6+Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)